#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
#define endl '\n'
#define ff first
#define ss second
#define pb emplace_back
#define ppb pop_back
// #define int long long
#define float long double
#define lb lower_bound
#define ub upper_bound
#define sz(x) (int)(x).size()
#define ppc __builtin_popcountll
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define uniq(v) (v).erase(unique(all(v)),(v).end())
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define invec(a,n) vector<int>a(n); rep(i,0,n) cin>>a[i]
#define inarr(a,n) int a[n]; rep(i,0,n) scanf("%d", &a[i])
#define in(k,a) for(auto k : a)
#define disp(a) in(k,a){ cout<<k<<' ';} cout<<endl
const int M=1e9+7;
#define test int t; cin>>t; while(t--)
#define SUMARR(a) accumulate(a , a+n ,0LL)
#define SUM(v) accumulate(all(v),0LL)
#define MAXIARR(a,n) *max_element(a , a+n)
#define MINIARR(a,n) *min_element(a , a+n)
#define MAX(v) *max_element((v).begin(),(v).end())
#define MINI(v) *min_element((v).begin(),(v).end())
#define PI atan(1)*4
#define INF INT64_MAX
#define fbo(x) find_by_order(x)
#define ook(x) order_of_key(x)
#define out(x) cout<<x<<endl;
bool sortbysec(const pair<int,int> &a,const pair<int,int> &b){return (a.second < b.second);}
#define f(i,n) for(int i = 0; i < n; i++)
/////खुदी को कर बुलंद इतना के हर तकदीर से पहले खुदा बन्दे से खुद पूछे के बता तेरी रज़ा क्या है;/////
int countDivisors(int n)
{
int cnt = 0;
for (int i = 1; i <= sqrt(n); i++) {
if (n % i == 0) {
if (n / i == i)
cnt++;
else // Otherwise count both
cnt = cnt + 2;
}
}
return cnt;
}
int digitsSum(int n) {
int ans = 0;
while(n != 0) {
ans += n%10;
n /= 10;
}
return ans;
}
int binpow(int a, int b, int m){
//take INF if no Modulo
int ans = 1;
while(b>0){
if(b&1){
ans *= a;
if(ans > m) ans %= m;
}
a *= a;
if(a > m) a %= m;
b>>=1;
}
return ans;
}
int inv_mod(int b,int mod){
return binpow(b,mod-2,mod)%mod;
}
const int32_t N = 3e5 + 10;
int FLOOR(const int a, const int b) { if (a > 0 || a % b == 0) return a / b; return (a / b - 1); }
int CEIL(const int a, const int b) {return (a + b - 1) / b;}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int POW(int a, int b) { return b == 0 ? 1 : a * POW(a, b - 1); }
int mod_exp(int a, int b, int mod) {int res = 1; while (b > 0) {if (b & 1)res = (res * a) % mod; a = (a * a) % mod; b = b >> 1; } return res % mod; }
int mod_mul(int a, int b, int m) {a = a % m; b = b % m; return (((a * b) % m) + m) % m;}
int mod_sub(int a, int b, int m) {a = a % m; b = b % m; return (((a - b) % m) + m) % m;}
int extended_gcd(int a, int b, int &x, int &y) {if (b == 0) {x = 1; y = 0; return x; } int gcd = extended_gcd(b, a % b, y, x); y -= x * (a / b); return gcd; }
int mod_inv(int a, int b) {int r1, r2; int gcd = extended_gcd(a, b, r1, r2); assert(gcd == 1); return r1; }
int mod_div(int a, int b, int m) {a = a % m; b = b % m; return (mod_mul(a, mod_inv(b, m), m) + m) % m;}
void dosomething(){
int n;
scanf("%d", &n);
inarr(a,n);
int c[n];
c[0]=a[0];
rep(i,1,n){
c[i]=c[i-1]+a[i];
}
int l=1,r=n;
while(l<r){
int m=l+(r-l)/2;
printf("? %d ", m-l+1);
rep(i,0,m-l+1){
printf("%d ", l+i);
}
printf("\n");
fflush(stdout);
int res;
scanf("%d", &res);
//point =m+1
int g=c[m-1];
if(l>1){
g-=c[l-2];
}
if(res>g){
r=m;
}
else{
l=m+1;
}
}
printf("! %d\n", l);
fflush(stdout);
}
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
//cout << fixed << setprecision(9);
int t;
scanf("%d",&t);
while(t--){
dosomething();
//Case #<<t<<'='<< ;
}
return 0;
}
// #include <cstdio>
// #include <cstring>
// using namespace std;
// int main() {
// int l = 1, r = 1000000;
// while (l != r) {
// int mid = (l + r + 1) / 2;
// printf("%d\n", mid);
// fflush(stdout);
// char response[3];
// scanf("%s", response);
// if (strcmp(response, "<") == 0)
// r = mid - 1;
// else
// l = mid;
// }
// printf("! %d\n", l);
// fflush(stdout);
// }
810A - Straight A | 1433C - Dominant Piranha |
633A - Ebony and Ivory | 1196A - Three Piles of Candies |
299A - Ksusha and Array | 448B - Suffix Structures |
1092B - Teams Forming | 1166C - A Tale of Two Lands |
544B - Sea and Islands | 152B - Steps |
1174D - Ehab and the Expected XOR Problem | 1511A - Review Site |
1316A - Grade Allocation | 838A - Binary Blocks |
1515D - Phoenix and Socks | 1624D - Palindromes Coloring |
1552F - Telepanting | 1692G - 2Sort |
1191A - Tokitsukaze and Enhancement | 903A - Hungry Student Problem |
52B - Right Triangles | 1712A - Wonderful Permutation |
1712D - Empty Graph | 1712B - Woeful Permutation |
1712C - Sort Zero | 1028B - Unnatural Conditions |
735B - Urbanization | 746C - Tram |
1278B - A and B | 1353D - Constructing the Array |